package com.xianxiaohui.factory.method;

/**
 * @author lvxiongfei
 */
public interface NumberFactory {

    // public sttic final 可以省略
    public static final NumberFactory impl = new NumberFactoryImpl();

    /**
     * 把字符串转数字
     * @param s 字符串
     * @return
     */
    Number parse(String s);

    /**
     * 获取实例
     * @return
     */
    static NumberFactory getInstance() {
        return impl;
    }

}
